from flask import jsonify,Response,Flask,request,render_template

app = Flask(__name__)

@app.route('/json')
def json():
    data = {'key': 'value'}
    return jsonify(data)


@app.route('/custom')
def custom_response():
    response = Response('Custom response with headers', status=200)
    response.headers['X-Custom-Header'] = 'Value'
    return response

@app.route('/hello/<name>')
def hello(name):
    return render_template('hello.html', name=name)

@app.route('/user/<int:user_id>')
def user_profile(user_id):
    return f'User ID: {user_id}'

@app.route('/user')
def user_list():
    return 'User List'




if __name__ == '__main__':
    app.run(debug=True)

